﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ZhiAo.CommonLibrary;
using ZhiAo.Management;

/// <summary>
///BasePage 的摘要说明
/// </summary>
public class BasePage : Page
{
    public BasePage()
    {
        base.Page.Load += new EventHandler(BasePage_Load);
    }

    public void BasePage_Load(object sender, EventArgs e)
    {
        try
        {
            if (UserInfo.CurrentUserInfo == null)
                Response.Write("<script>window.parent.location.href='../../Login.aspx'</script>");

        }
        catch
        {
            Response.Write("<script>window.parent.location.href='../../Login.aspx'</script>");
            Response.End();
        }

        //获取当前登录状态
        //if (!UserInfo.)
        //{
        //    //重新登录
        //    Response.Write("<script>window.parent.location.href='../../Login.aspx'</script>");
        //}
        //if (!UserInfo.ChkRight)
        //{
        //    //提示没权限访问 另外提示页面
        //    Response.Write("<script>window.parent.location.href='../../Login.aspx'</script>");
        //}
    }
    public string GetSite
    {
        get { return PageHelper.Request("siteId"); }
    }
}
